﻿using System.ServiceModel;

namespace Ipmce.RemoteVoting.Common.Tools.Wcf.Unity.LifetimeManagers
{
	/// <summary>
	/// Implements the lifetime manager storage for the <see cref="System.ServiceModel.OperationContext"/> extension.
	/// </summary>
	public class UnityOperationContextExtension : UnityWcfExtension<OperationContext>
	{
		/// <summary>
		/// Gets the <see cref="UnityOperationContextExtension"/> for the current operation context.
		/// </summary>
		public static UnityOperationContextExtension Current
		{
			get
			{
				return OperationContext.Current.Extensions.Find<UnityOperationContextExtension>();
			}
		}
	}
}